<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Bindings: GTK+ 3 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GTK+ 3 Reference Manual">
<link rel="up" href="gtkbase.html" title="Part III. GTK+ Core Reference">
<link rel="prev" href="GtkSettings.html" title="Settings">
<link rel="next" href="gtk3-Standard-Enumerations.html" title="Standard Enumerations">
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#gtk3-Bindings.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="gtkbase.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GtkSettings.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gtk3-Standard-Enumerations.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="gtk3-Bindings"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gtk3-Bindings.top_of_page"></a>Bindings</span></h2>
<p>Bindings — Key bindings for individual widgets</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="gtk3-Bindings.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gtk3-Bindings.html#gtk-binding-entry-add-signall" title="gtk_binding_entry_add_signall ()">gtk_binding_entry_add_signall</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gtk3-Bindings.html#GtkBindingSet" title="struct GtkBindingSet"><span class="returnvalue">GtkBindingSet</span></a> *
</td>
<td class="function_name">
<a class="link" href="gtk3-Bindings.html#gtk-binding-set-new" title="gtk_binding_set_new ()">gtk_binding_set_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gtk3-Bindings.html#GtkBindingSet" title="struct GtkBindingSet"><span class="returnvalue">GtkBindingSet</span></a> *
</td>
<td class="function_name">
<a class="link" href="gtk3-Bindings.html#gtk-binding-set-by-class" title="gtk_binding_set_by_class ()">gtk_binding_set_by_class</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gtk3-Bindings.html#GtkBindingSet" title="struct GtkBindingSet"><span class="returnvalue">GtkBindingSet</span></a> *
</td>
<td class="function_name">
<a class="link" href="gtk3-Bindings.html#gtk-binding-set-find" title="gtk_binding_set_find ()">gtk_binding_set_find</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="gtk3-Bindings.html#gtk-bindings-activate" title="gtk_bindings_activate ()">gtk_bindings_activate</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="gtk3-Bindings.html#gtk-bindings-activate-event" title="gtk_bindings_activate_event ()">gtk_bindings_activate_event</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="gtk3-Bindings.html#gtk-binding-set-activate" title="gtk_binding_set_activate ()">gtk_binding_set_activate</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gtk3-Bindings.html#gtk-binding-entry-add-signal" title="gtk_binding_entry_add_signal ()">gtk_binding_entry_add_signal</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GTokenType</span>
</td>
<td class="function_name">
<a class="link" href="gtk3-Bindings.html#gtk-binding-entry-add-signal-from-string" title="gtk_binding_entry_add_signal_from_string ()">gtk_binding_entry_add_signal_from_string</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gtk3-Bindings.html#gtk-binding-entry-skip" title="gtk_binding_entry_skip ()">gtk_binding_entry_skip</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gtk3-Bindings.html#gtk-binding-entry-remove" title="gtk_binding_entry_remove ()">gtk_binding_entry_remove</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gtk3-Bindings.html#gtk-binding-set-add-path" title="gtk_binding_set_add_path ()">gtk_binding_set_add_path</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gtk3-Bindings.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="gtk3-Bindings.html#GtkBindingSet" title="struct GtkBindingSet">GtkBindingSet</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="gtk3-Bindings.html#GtkBindingEntry" title="struct GtkBindingEntry">GtkBindingEntry</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="gtk3-Bindings.html#GtkBindingSignal" title="struct GtkBindingSignal">GtkBindingSignal</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="gtk3-Bindings.html#GtkBindingArg" title="struct GtkBindingArg">GtkBindingArg</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gtk3-Bindings.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gtk/gtk.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="gtk3-Bindings.description"></a><h2>Description</h2>
<p><a class="link" href="gtk3-Bindings.html#GtkBindingSet" title="struct GtkBindingSet"><span class="type">GtkBindingSet</span></a> provides a mechanism for configuring GTK+ key bindings
through CSS files. This eases key binding adjustments for application
developers as well as users and provides GTK+ users or administrators
with high key  binding configurability which requires no application
or toolkit side changes.</p>
<p>In order for bindings to work in a custom widget implementation, the
widget’s <a class="link" href="GtkWidget.html#GtkWidget--can-focus" title="The “can-focus” property"><span class="type">“can-focus”</span></a> and <a class="link" href="GtkWidget.html#GtkWidget--has-focus" title="The “has-focus” property"><span class="type">“has-focus”</span></a> properties
must both be true. For example, by calling <a class="link" href="GtkWidget.html#gtk-widget-set-can-focus" title="gtk_widget_set_can_focus ()"><code class="function">gtk_widget_set_can_focus()</code></a>
in the widget’s initialisation function; and by calling
<a class="link" href="GtkWidget.html#gtk-widget-grab-focus" title="gtk_widget_grab_focus ()"><code class="function">gtk_widget_grab_focus()</code></a> when the widget is clicked.</p>
<div class="refsect2">
<a name="id-1.4.9.6.4"></a><h3>Installing a key binding</h3>
<p>A CSS file binding consists of a “binding-set” definition and a match
statement to apply the binding set to specific widget types. Details
on the matching mechanism are described under
Selectors
in the <a class="link" href="GtkCssProvider.html" title="GtkCssProvider"><span class="type">GtkCssProvider</span></a> documentation. Inside the binding set
definition, key combinations are bound to one or more specific
signal emissions on the target widget. Key combinations are strings
consisting of an optional <span class="type">GdkModifierType</span> name and
key names
such as those defined in <code class="literal">gdk/gdkkeysyms.h</code>
or returned from <code class="function">gdk_keyval_name()</code>, they have to be parsable by
<a class="link" href="gtk3-Keyboard-Accelerators.html#gtk-accelerator-parse" title="gtk_accelerator_parse ()"><code class="function">gtk_accelerator_parse()</code></a>. Specifications of signal emissions consist
of a string identifying the signal name, and a list of signal specific
arguments in parenthesis.</p>
<p>For example for binding Control and the left or right cursor keys
of a <a class="link" href="GtkEntry.html" title="GtkEntry"><span class="type">GtkEntry</span></a> widget to the <a class="link" href="GtkEntry.html#GtkEntry-move-cursor" title="The “move-cursor” signal"><span class="type">“move-cursor”</span></a> signal (so
movement occurs in 3-character steps), the following binding can be
used:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="err">@</span><span class="n">binding</span><span class="o">-</span><span class="n">set</span> <span class="n">MoveCursor3</span>
<span class="p">{</span>
  <span class="n">bind</span> <span class="s">&quot;&lt;Control&gt;Right&quot;</span> <span class="p">{</span> <span class="s">&quot;move-cursor&quot;</span> <span class="p">(</span><span class="n">visual</span><span class="o">-</span><span class="n">positions</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span> <span class="p">};</span>
  <span class="n">bind</span> <span class="s">&quot;&lt;Control&gt;Left&quot;</span> <span class="p">{</span> <span class="s">&quot;move-cursor&quot;</span> <span class="p">(</span><span class="n">visual</span><span class="o">-</span><span class="n">positions</span><span class="p">,</span> <span class="mi">-3</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span> <span class="p">};</span>
<span class="p">}</span>

<span class="n">entry</span>
<span class="p">{</span>
  <span class="o">-</span><span class="n">gtk</span><span class="o">-</span><span class="n">key</span><span class="o">-</span><span class="nl">bindings</span><span class="p">:</span> <span class="n">MoveCursor3</span><span class="p">;</span>
<span class="p">}</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
</div>
<hr>
<div class="refsect2">
<a name="id-1.4.9.6.5"></a><h3>Unbinding existing key bindings</h3>
<p>GTK+ already defines a number of useful bindings for the widgets
it provides. Because custom bindings set up in CSS files take
precedence over the default bindings shipped with GTK+, overriding
existing bindings as demonstrated in
Installing a key binding
works as expected. The same mechanism can not be used to “unbind”
existing bindings, however.</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="err">@</span><span class="n">binding</span><span class="o">-</span><span class="n">set</span> <span class="n">MoveCursor3</span>
<span class="p">{</span>
  <span class="n">bind</span> <span class="s">&quot;&lt;Control&gt;Right&quot;</span> <span class="p">{</span>  <span class="p">};</span>
  <span class="n">bind</span> <span class="s">&quot;&lt;Control&gt;Left&quot;</span> <span class="p">{</span>  <span class="p">};</span>
<span class="p">}</span>

<span class="n">entry</span>
<span class="p">{</span>
  <span class="o">-</span><span class="n">gtk</span><span class="o">-</span><span class="n">key</span><span class="o">-</span><span class="nl">bindings</span><span class="p">:</span> <span class="n">MoveCursor3</span><span class="p">;</span>
<span class="p">}</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
<p>The above example will not have the desired effect of causing
“&lt;Control&gt;Right” and “&lt;Control&gt;Left” key presses to be ignored by GTK+.
Instead, it just causes any existing bindings from the bindings set
“MoveCursor3” to be deleted, so when “&lt;Control&gt;Right” or
“&lt;Control&gt;Left” are pressed, no binding for these keys is found in
binding set “MoveCursor3”. GTK+ will thus continue to search for
matching key bindings, and will eventually lookup and find the default
GTK+ bindings for entries which implement word movement. To keep GTK+
from activating its default bindings, the “unbind” keyword can be used
like this:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="err">@</span><span class="n">binding</span><span class="o">-</span><span class="n">set</span> <span class="n">MoveCursor3</span>
<span class="p">{</span>
  <span class="n">unbind</span> <span class="s">&quot;&lt;Control&gt;Right&quot;</span><span class="p">;</span>
  <span class="n">unbind</span> <span class="s">&quot;&lt;Control&gt;Left&quot;</span><span class="p">;</span>
<span class="p">}</span>

<span class="n">entry</span>
<span class="p">{</span>
  <span class="o">-</span><span class="n">gtk</span><span class="o">-</span><span class="n">key</span><span class="o">-</span><span class="nl">bindings</span><span class="p">:</span> <span class="n">MoveCursor3</span><span class="p">;</span>
<span class="p">}</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
<p>Now, GTK+ will find a match when looking up “&lt;Control&gt;Right” and
“&lt;Control&gt;Left” key presses before it resorts to its default bindings,
and the match instructs it to abort (“unbind”) the search, so the key
presses are not consumed by this widget. As usual, further processing
of the key presses, e.g. by an entry’s parent widget, is now possible.</p>
</div>
</div>
<div class="refsect1">
<a name="gtk3-Bindings.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gtk-binding-entry-add-signall"></a><h3>gtk_binding_entry_add_signall ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_binding_entry_add_signall (<em class="parameter"><code><a class="link" href="gtk3-Bindings.html#GtkBindingSet" title="struct GtkBindingSet"><span class="type">GtkBindingSet</span></a> *binding_set</code></em>,
                               <em class="parameter"><code><span class="type">guint</span> keyval</code></em>,
                               <em class="parameter"><code><span class="type">GdkModifierType</span> modifiers</code></em>,
                               <em class="parameter"><code>const <span class="type">gchar</span> *signal_name</code></em>,
                               <em class="parameter"><code><span class="type">GSList</span> *binding_args</code></em>);</pre>
<p>Override or install a new key binding for <em class="parameter"><code>keyval</code></em>
 with <em class="parameter"><code>modifiers</code></em>
 on
<em class="parameter"><code>binding_set</code></em>
.</p>
<div class="refsect3">
<a name="gtk-binding-entry-add-signall.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>binding_set</p></td>
<td class="parameter_description"><p>a <a class="link" href="gtk3-Bindings.html#GtkBindingSet" title="struct GtkBindingSet"><span class="type">GtkBindingSet</span></a> to add a signal to</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>keyval</p></td>
<td class="parameter_description"><p>key value</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>modifiers</p></td>
<td class="parameter_description"><p>key modifier</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>signal_name</p></td>
<td class="parameter_description"><p>signal name to be bound</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>binding_args</p></td>
<td class="parameter_description"><p>list of <a class="link" href="gtk3-Bindings.html#GtkBindingArg" title="struct GtkBindingArg"><span class="type">GtkBindingArg</span></a> signal arguments. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GtkBindingArg]</span></td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-binding-set-new"></a><h3>gtk_binding_set_new ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-Bindings.html#GtkBindingSet" title="struct GtkBindingSet"><span class="returnvalue">GtkBindingSet</span></a> *
gtk_binding_set_new (<em class="parameter"><code>const <span class="type">gchar</span> *set_name</code></em>);</pre>
<p>GTK+ maintains a global list of binding sets. Each binding set has
a unique name which needs to be specified upon creation.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="gtk-binding-set-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>set_name</p></td>
<td class="parameter_description"><p>unique name of this binding set</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-binding-set-new.returns"></a><h4>Returns</h4>
<p>new binding set. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-binding-set-by-class"></a><h3>gtk_binding_set_by_class ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-Bindings.html#GtkBindingSet" title="struct GtkBindingSet"><span class="returnvalue">GtkBindingSet</span></a> *
gtk_binding_set_by_class (<em class="parameter"><code><span class="type">gpointer</span> object_class</code></em>);</pre>
<p>This function returns the binding set named after the type name of
the passed in class structure. New binding sets are created on
demand by this function.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="gtk-binding-set-by-class.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>object_class</p></td>
<td class="parameter_description"><p>a valid <span class="type">GObject</span> class</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-binding-set-by-class.returns"></a><h4>Returns</h4>
<p>the binding set corresponding to
<em class="parameter"><code>object_class</code></em>
. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-binding-set-find"></a><h3>gtk_binding_set_find ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-Bindings.html#GtkBindingSet" title="struct GtkBindingSet"><span class="returnvalue">GtkBindingSet</span></a> *
gtk_binding_set_find (<em class="parameter"><code>const <span class="type">gchar</span> *set_name</code></em>);</pre>
<p>Find a binding set by its globally unique name.</p>
<p>The <em class="parameter"><code>set_name</code></em>
 can either be a name used for <a class="link" href="gtk3-Bindings.html#gtk-binding-set-new" title="gtk_binding_set_new ()"><code class="function">gtk_binding_set_new()</code></a>
or the type name of a class used in <a class="link" href="gtk3-Bindings.html#gtk-binding-set-by-class" title="gtk_binding_set_by_class ()"><code class="function">gtk_binding_set_by_class()</code></a>.</p>
<div class="refsect3">
<a name="gtk-binding-set-find.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>set_name</p></td>
<td class="parameter_description"><p>unique binding set name</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-binding-set-find.returns"></a><h4>Returns</h4>
<p><code class="literal">NULL</code> or the specified binding set. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-bindings-activate"></a><h3>gtk_bindings_activate ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gtk_bindings_activate (<em class="parameter"><code><span class="type">GObject</span> *object</code></em>,
                       <em class="parameter"><code><span class="type">guint</span> keyval</code></em>,
                       <em class="parameter"><code><span class="type">GdkModifierType</span> modifiers</code></em>);</pre>
<p>Find a key binding matching <em class="parameter"><code>keyval</code></em>
 and <em class="parameter"><code>modifiers</code></em>
 and activate the
binding on <em class="parameter"><code>object</code></em>
.</p>
<div class="refsect3">
<a name="gtk-bindings-activate.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>object</p></td>
<td class="parameter_description"><p>object to activate when binding found</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>keyval</p></td>
<td class="parameter_description"><p>key value of the binding</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>modifiers</p></td>
<td class="parameter_description"><p>key modifier of the binding</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-bindings-activate.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if a binding was found and activated</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-bindings-activate-event"></a><h3>gtk_bindings_activate_event ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gtk_bindings_activate_event (<em class="parameter"><code><span class="type">GObject</span> *object</code></em>,
                             <em class="parameter"><code><span class="type">GdkEventKey</span> *event</code></em>);</pre>
<p>Looks up key bindings for <em class="parameter"><code>object</code></em>
 to find one matching
<em class="parameter"><code>event</code></em>
, and if one was found, activate it.</p>
<div class="refsect3">
<a name="gtk-bindings-activate-event.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>object</p></td>
<td class="parameter_description"><p>a <span class="type">GObject</span> (generally must be a widget)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>event</p></td>
<td class="parameter_description"><p>a <span class="type">GdkEventKey</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-bindings-activate-event.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if a matching key binding was found</p>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-binding-set-activate"></a><h3>gtk_binding_set_activate ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gtk_binding_set_activate (<em class="parameter"><code><a class="link" href="gtk3-Bindings.html#GtkBindingSet" title="struct GtkBindingSet"><span class="type">GtkBindingSet</span></a> *binding_set</code></em>,
                          <em class="parameter"><code><span class="type">guint</span> keyval</code></em>,
                          <em class="parameter"><code><span class="type">GdkModifierType</span> modifiers</code></em>,
                          <em class="parameter"><code><span class="type">GObject</span> *object</code></em>);</pre>
<p>Find a key binding matching <em class="parameter"><code>keyval</code></em>
 and <em class="parameter"><code>modifiers</code></em>
 within
<em class="parameter"><code>binding_set</code></em>
 and activate the binding on <em class="parameter"><code>object</code></em>
.</p>
<div class="refsect3">
<a name="gtk-binding-set-activate.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>binding_set</p></td>
<td class="parameter_description"><p>a <a class="link" href="gtk3-Bindings.html#GtkBindingSet" title="struct GtkBindingSet"><span class="type">GtkBindingSet</span></a> set to activate</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>keyval</p></td>
<td class="parameter_description"><p>key value of the binding</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>modifiers</p></td>
<td class="parameter_description"><p>key modifier of the binding</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>object</p></td>
<td class="parameter_description"><p>object to activate when binding found</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-binding-set-activate.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if a binding was found and activated</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-binding-entry-add-signal"></a><h3>gtk_binding_entry_add_signal ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_binding_entry_add_signal (<em class="parameter"><code><a class="link" href="gtk3-Bindings.html#GtkBindingSet" title="struct GtkBindingSet"><span class="type">GtkBindingSet</span></a> *binding_set</code></em>,
                              <em class="parameter"><code><span class="type">guint</span> keyval</code></em>,
                              <em class="parameter"><code><span class="type">GdkModifierType</span> modifiers</code></em>,
                              <em class="parameter"><code>const <span class="type">gchar</span> *signal_name</code></em>,
                              <em class="parameter"><code><span class="type">guint</span> n_args</code></em>,
                              <em class="parameter"><code>...</code></em>);</pre>
<p>Override or install a new key binding for <em class="parameter"><code>keyval</code></em>
 with <em class="parameter"><code>modifiers</code></em>
 on
<em class="parameter"><code>binding_set</code></em>
. When the binding is activated, <em class="parameter"><code>signal_name</code></em>
 will be
emitted on the target widget, with <em class="parameter"><code>n_args</code></em>
 <em class="parameter"><code>Varargs</code></em>
 used as
arguments.</p>
<p>Each argument to the signal must be passed as a pair of varargs: the
<span class="type">GType</span> of the argument, followed by the argument value (which must
be of the given type). There must be <em class="parameter"><code>n_args</code></em>
 pairs in total.</p>
<div class="refsect3">
<a name="id-1.4.9.7.9.6"></a><h4>Adding a Key Binding</h4>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="n">GtkBindingSet</span> <span class="o">*</span><span class="n">binding_set</span><span class="p">;</span>
<span class="n">GdkModifierType</span> <span class="n">modmask</span> <span class="o">=</span> <span class="n">GDK_CONTROL_MASK</span><span class="p">;</span>
<span class="kt">int</span> <span class="n">count</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
<span class="n">gtk_binding_entry_add_signal</span> <span class="p">(</span><span class="n">binding_set</span><span class="p">,</span>
                              <span class="n">GDK_KEY_space</span><span class="p">,</span>
                              <span class="n">modmask</span><span class="p">,</span>
                              <span class="s">&quot;move-cursor&quot;</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span>
                              <span class="n">GTK_TYPE_MOVEMENT_STEP</span><span class="p">,</span> <span class="n">GTK_MOVEMENT_PAGES</span><span class="p">,</span>
                              <span class="n">G_TYPE_INT</span><span class="p">,</span> <span class="n">count</span><span class="p">,</span>
                              <span class="n">G_TYPE_BOOLEAN</span><span class="p">,</span> <span class="n">FALSE</span><span class="p">);</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
</div>
<div class="refsect3">
<a name="gtk-binding-entry-add-signal.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>binding_set</p></td>
<td class="parameter_description"><p>a <a class="link" href="gtk3-Bindings.html#GtkBindingSet" title="struct GtkBindingSet"><span class="type">GtkBindingSet</span></a> to install an entry for</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>keyval</p></td>
<td class="parameter_description"><p>key value of binding to install</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>modifiers</p></td>
<td class="parameter_description"><p>key modifier of binding to install</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>signal_name</p></td>
<td class="parameter_description"><p>signal to execute upon activation</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n_args</p></td>
<td class="parameter_description"><p>number of arguments to <em class="parameter"><code>signal_name</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>arguments to <em class="parameter"><code>signal_name</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-binding-entry-add-signal-from-string"></a><h3>gtk_binding_entry_add_signal_from_string ()</h3>
<pre class="programlisting"><span class="returnvalue">GTokenType</span>
gtk_binding_entry_add_signal_from_string
                               (<em class="parameter"><code><a class="link" href="gtk3-Bindings.html#GtkBindingSet" title="struct GtkBindingSet"><span class="type">GtkBindingSet</span></a> *binding_set</code></em>,
                                <em class="parameter"><code>const <span class="type">gchar</span> *signal_desc</code></em>);</pre>
<p>Parses a signal description from <em class="parameter"><code>signal_desc</code></em>
 and incorporates
it into <em class="parameter"><code>binding_set</code></em>
.</p>
<p>Signal descriptions may either bind a key combination to
one or more signals:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="n">bind</span> <span class="s">&quot;key&quot;</span> <span class="p">{</span>
  <span class="s">&quot;signalname&quot;</span> <span class="p">(</span><span class="n">param</span><span class="p">,</span> <span class="p">...)</span>
  <span class="p">...</span>
<span class="p">}</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
<p>Or they may also unbind a key combination:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="n">unbind</span> <span class="s">&quot;key&quot;</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
<p>Key combinations must be in a format that can be parsed by
<a class="link" href="gtk3-Keyboard-Accelerators.html#gtk-accelerator-parse" title="gtk_accelerator_parse ()"><code class="function">gtk_accelerator_parse()</code></a>.</p>
<div class="refsect3">
<a name="gtk-binding-entry-add-signal-from-string.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>binding_set</p></td>
<td class="parameter_description"><p>a <a class="link" href="gtk3-Bindings.html#GtkBindingSet" title="struct GtkBindingSet"><span class="type">GtkBindingSet</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>signal_desc</p></td>
<td class="parameter_description"><p>a signal description</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-binding-entry-add-signal-from-string.returns"></a><h4>Returns</h4>
<p> <code class="literal">G_TOKEN_NONE</code> if the signal was successfully parsed and added,
the expected token otherwise</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-binding-entry-skip"></a><h3>gtk_binding_entry_skip ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_binding_entry_skip (<em class="parameter"><code><a class="link" href="gtk3-Bindings.html#GtkBindingSet" title="struct GtkBindingSet"><span class="type">GtkBindingSet</span></a> *binding_set</code></em>,
                        <em class="parameter"><code><span class="type">guint</span> keyval</code></em>,
                        <em class="parameter"><code><span class="type">GdkModifierType</span> modifiers</code></em>);</pre>
<p>Install a binding on <em class="parameter"><code>binding_set</code></em>
 which causes key lookups
to be aborted, to prevent bindings from lower priority sets
to be activated.</p>
<div class="refsect3">
<a name="gtk-binding-entry-skip.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>binding_set</p></td>
<td class="parameter_description"><p>a <a class="link" href="gtk3-Bindings.html#GtkBindingSet" title="struct GtkBindingSet"><span class="type">GtkBindingSet</span></a> to skip an entry of</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>keyval</p></td>
<td class="parameter_description"><p>key value of binding to skip</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>modifiers</p></td>
<td class="parameter_description"><p>key modifier of binding to skip</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.12</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-binding-entry-remove"></a><h3>gtk_binding_entry_remove ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_binding_entry_remove (<em class="parameter"><code><a class="link" href="gtk3-Bindings.html#GtkBindingSet" title="struct GtkBindingSet"><span class="type">GtkBindingSet</span></a> *binding_set</code></em>,
                          <em class="parameter"><code><span class="type">guint</span> keyval</code></em>,
                          <em class="parameter"><code><span class="type">GdkModifierType</span> modifiers</code></em>);</pre>
<p>Remove a binding previously installed via
<a class="link" href="gtk3-Bindings.html#gtk-binding-entry-add-signal" title="gtk_binding_entry_add_signal ()"><code class="function">gtk_binding_entry_add_signal()</code></a> on <em class="parameter"><code>binding_set</code></em>
.</p>
<div class="refsect3">
<a name="gtk-binding-entry-remove.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>binding_set</p></td>
<td class="parameter_description"><p>a <a class="link" href="gtk3-Bindings.html#GtkBindingSet" title="struct GtkBindingSet"><span class="type">GtkBindingSet</span></a> to remove an entry of</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>keyval</p></td>
<td class="parameter_description"><p>key value of binding to remove</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>modifiers</p></td>
<td class="parameter_description"><p>key modifier of binding to remove</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-binding-set-add-path"></a><h3>gtk_binding_set_add_path ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_binding_set_add_path (<em class="parameter"><code><a class="link" href="gtk3-Bindings.html#GtkBindingSet" title="struct GtkBindingSet"><span class="type">GtkBindingSet</span></a> *binding_set</code></em>,
                          <em class="parameter"><code><a class="link" href="gtk3-Resource-Files.html#GtkPathType" title="enum GtkPathType"><span class="type">GtkPathType</span></a> path_type</code></em>,
                          <em class="parameter"><code>const <span class="type">gchar</span> *path_pattern</code></em>,
                          <em class="parameter"><code><a class="link" href="gtk3-Resource-Files.html#GtkPathPriorityType" title="enum GtkPathPriorityType"><span class="type">GtkPathPriorityType</span></a> priority</code></em>);</pre>
<div class="warning"><p><code class="literal">gtk_binding_set_add_path</code> has been deprecated since version 3.0 and should not be used in newly-written code.</p></div>
<p>This function was used internally by the GtkRC parsing mechanism
to assign match patterns to <a class="link" href="gtk3-Bindings.html#GtkBindingSet" title="struct GtkBindingSet"><span class="type">GtkBindingSet</span></a> structures.</p>
<p>In GTK+ 3, these match patterns are unused.</p>
<div class="refsect3">
<a name="gtk-binding-set-add-path.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>binding_set</p></td>
<td class="parameter_description"><p>a <a class="link" href="gtk3-Bindings.html#GtkBindingSet" title="struct GtkBindingSet"><span class="type">GtkBindingSet</span></a> to add a path to</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>path_type</p></td>
<td class="parameter_description"><p>path type the pattern applies to</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>path_pattern</p></td>
<td class="parameter_description"><p>the actual match pattern</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>priority</p></td>
<td class="parameter_description"><p>binding priority</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="gtk3-Bindings.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GtkBindingSet"></a><h3>struct GtkBindingSet</h3>
<pre class="programlisting">struct GtkBindingSet {
  gchar           *set_name;
  gint             priority;
  GSList          *widget_path_pspecs;
  GSList          *widget_class_pspecs;
  GSList          *class_branch_pspecs;
  GtkBindingEntry *entries;
  GtkBindingEntry *current;
  guint            parsed : 1;
};
</pre>
<p>A binding set maintains a list of activatable key bindings.
A single binding set can match multiple types of widgets.
Similar to style contexts, can be matched by any information contained
in a widgets <a class="link" href="gtk3-GtkWidgetPath.html#GtkWidgetPath" title="GtkWidgetPath"><span class="type">GtkWidgetPath</span></a>. When a binding within a set is matched upon
activation, an action signal is emitted on the target widget to carry out
the actual activation.</p>
<div class="refsect3">
<a name="GtkBindingSet.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><span class="type">gchar</span> *<em class="structfield"><code><a name="GtkBindingSet.set-name"></a>set_name</code></em>;</p></td>
<td class="struct_member_description"><p>unique name of this binding set</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><span class="type">gint</span> <em class="structfield"><code><a name="GtkBindingSet.priority"></a>priority</code></em>;</p></td>
<td class="struct_member_description"><p>unused</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><span class="type">GSList</span> *<em class="structfield"><code><a name="GtkBindingSet.widget-path-pspecs"></a>widget_path_pspecs</code></em>;</p></td>
<td class="struct_member_description"><p>unused</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><span class="type">GSList</span> *<em class="structfield"><code><a name="GtkBindingSet.widget-class-pspecs"></a>widget_class_pspecs</code></em>;</p></td>
<td class="struct_member_description"><p>unused</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><span class="type">GSList</span> *<em class="structfield"><code><a name="GtkBindingSet.class-branch-pspecs"></a>class_branch_pspecs</code></em>;</p></td>
<td class="struct_member_description"><p>unused</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="gtk3-Bindings.html#GtkBindingEntry" title="struct GtkBindingEntry"><span class="type">GtkBindingEntry</span></a> *<em class="structfield"><code><a name="GtkBindingSet.entries"></a>entries</code></em>;</p></td>
<td class="struct_member_description"><p>the key binding entries in this binding set</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="gtk3-Bindings.html#GtkBindingEntry" title="struct GtkBindingEntry"><span class="type">GtkBindingEntry</span></a> *<em class="structfield"><code><a name="GtkBindingSet.current"></a>current</code></em>;</p></td>
<td class="struct_member_description"><p>implementation detail</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><span class="type">guint</span> <em class="structfield"><code><a name="GtkBindingSet.parsed"></a>parsed</code></em> : 1;</p></td>
<td class="struct_member_description"><p>whether this binding set stems from a CSS file and is reset upon theme changes</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GtkBindingEntry"></a><h3>struct GtkBindingEntry</h3>
<pre class="programlisting">struct GtkBindingEntry {
  /* key portion */
  guint             keyval;
  GdkModifierType   modifiers;

  GtkBindingSet    *binding_set;
  guint             destroyed     : 1;
  guint             in_emission   : 1;
  guint             marks_unbound : 1;
  GtkBindingEntry  *set_next;
  GtkBindingEntry  *hash_next;
  GtkBindingSignal *signals;
};
</pre>
<p>Each key binding element of a binding sets binding list is
represented by a GtkBindingEntry.</p>
<div class="refsect3">
<a name="GtkBindingEntry.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><span class="type">guint</span> <em class="structfield"><code><a name="GtkBindingEntry.keyval"></a>keyval</code></em>;</p></td>
<td class="struct_member_description"><p>key value to match</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><span class="type">GdkModifierType</span> <em class="structfield"><code><a name="GtkBindingEntry.modifiers"></a>modifiers</code></em>;</p></td>
<td class="struct_member_description"><p>key modifiers to match</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="gtk3-Bindings.html#GtkBindingSet" title="struct GtkBindingSet"><span class="type">GtkBindingSet</span></a> *<em class="structfield"><code><a name="GtkBindingEntry.binding-set"></a>binding_set</code></em>;</p></td>
<td class="struct_member_description"><p>binding set this entry belongs to</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><span class="type">guint</span> <em class="structfield"><code><a name="GtkBindingEntry.destroyed"></a>destroyed</code></em> : 1;</p></td>
<td class="struct_member_description"><p>implementation detail</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><span class="type">guint</span> <em class="structfield"><code><a name="GtkBindingEntry.in-emission"></a>in_emission</code></em> : 1;</p></td>
<td class="struct_member_description"><p>implementation detail</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><span class="type">guint</span> <em class="structfield"><code><a name="GtkBindingEntry.marks-unbound"></a>marks_unbound</code></em> : 1;</p></td>
<td class="struct_member_description"><p>implementation detail</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="gtk3-Bindings.html#GtkBindingEntry" title="struct GtkBindingEntry"><span class="type">GtkBindingEntry</span></a> *<em class="structfield"><code><a name="GtkBindingEntry.set-next"></a>set_next</code></em>;</p></td>
<td class="struct_member_description"><p>linked list of entries maintained by binding set</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="gtk3-Bindings.html#GtkBindingEntry" title="struct GtkBindingEntry"><span class="type">GtkBindingEntry</span></a> *<em class="structfield"><code><a name="GtkBindingEntry.hash-next"></a>hash_next</code></em>;</p></td>
<td class="struct_member_description"><p>implementation detail</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="gtk3-Bindings.html#GtkBindingSignal" title="struct GtkBindingSignal"><span class="type">GtkBindingSignal</span></a> *<em class="structfield"><code><a name="GtkBindingEntry.signals"></a>signals</code></em>;</p></td>
<td class="struct_member_description"><p>action signals of this entry</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GtkBindingSignal"></a><h3>struct GtkBindingSignal</h3>
<pre class="programlisting">struct GtkBindingSignal {
  GtkBindingSignal *next;
  gchar            *signal_name;
  guint             n_args;
  GtkBindingArg    *args;
};
</pre>
<p>A GtkBindingSignal stores the necessary information to
activate a widget in response to a key press via a signal
emission.</p>
<div class="refsect3">
<a name="GtkBindingSignal.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><a class="link" href="gtk3-Bindings.html#GtkBindingSignal" title="struct GtkBindingSignal"><span class="type">GtkBindingSignal</span></a> *<em class="structfield"><code><a name="GtkBindingSignal.next"></a>next</code></em>;</p></td>
<td class="struct_member_description"><p>implementation detail</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><span class="type">gchar</span> *<em class="structfield"><code><a name="GtkBindingSignal.signal-name"></a>signal_name</code></em>;</p></td>
<td class="struct_member_description"><p>the action signal to be emitted</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><span class="type">guint</span> <em class="structfield"><code><a name="GtkBindingSignal.n-args"></a>n_args</code></em>;</p></td>
<td class="struct_member_description"><p>number of arguments specified for the signal</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="gtk3-Bindings.html#GtkBindingArg" title="struct GtkBindingArg"><span class="type">GtkBindingArg</span></a> *<em class="structfield"><code><a name="GtkBindingSignal.args"></a>args</code></em>;</p></td>
<td class="struct_member_description"><p>the arguments specified for the signal. </p></td>
<td class="struct_member_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_args]</span></td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GtkBindingArg"></a><h3>struct GtkBindingArg</h3>
<pre class="programlisting">struct GtkBindingArg {
  GType      arg_type;
  union {
    glong    long_data;
    gdouble  double_data;
    gchar   *string_data;
  } d;
};
</pre>
<p>A <a class="link" href="gtk3-Bindings.html#GtkBindingArg" title="struct GtkBindingArg"><span class="type">GtkBindingArg</span></a> holds the data associated with
an argument for a key binding signal emission as
stored in <a class="link" href="gtk3-Bindings.html#GtkBindingSignal" title="struct GtkBindingSignal"><span class="type">GtkBindingSignal</span></a>.</p>
<div class="refsect3">
<a name="GtkBindingArg.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody><tr>
<td class="struct_member_name"><p><span class="type">GType</span> <em class="structfield"><code><a name="GtkBindingArg.arg-type"></a>arg_type</code></em>;</p></td>
<td class="struct_member_description"><p>implementation detail</p></td>
<td class="struct_member_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="gtk3-Bindings.see-also"></a><h2>See Also</h2>
<p>Keyboard Accelerators, Mnemonics, <a class="link" href="GtkCssProvider.html" title="GtkCssProvider"><span class="type">GtkCssProvider</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>